//
//  BGRouteManager.m
//  BGRoutes
///Users/chenguibang/Desktop/ShopProj/BGRoutes/BGRoutes.xcodeproj
//  Created by chenguibang on 2017/3/7.
//  Copyright © 2017年 chenguibang. All rights reserved.
//

#import "BGRouteManager.h"
#import "RouteRule.h"
#import <JRDB/JRDB.h>
@implementation BGRouteManager
-(void)setUpRulesWithSQLite:(NSString *)dbPath{
    
    [[JRDBMgr shareInstance] setDefaultDatabasePath:@"/Users/chenguibang/Desktop/test11.sqlite"];
    [JRDBMgr shareInstance].debugMode = YES;
    [[JRDBMgr shareInstance] getHandler];
    [[JRDBMgr shareInstance] registerClazzes:@[
                                               [RouteRule class],
                                               ]];
    RouteRule *rule = [[RouteRule alloc]init];
    rule.cv = 1;
    rule.asd = [[ASD alloc]init];
    [rule jr_save];
    
    
   self.fmDatabase = [FMDatabase databaseWithPath:dbPath];
 
   
    
    if ([self.fmDatabase open]) {
        NSLog(@"kaikaikkkkkk-----");
    }
    if ([self.fmDatabase tableExists:@"tb_route"]) {
        NSLog(@"karewrewrewrewrewrewkkkk-----");
    }
}
@end
